home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / RxMUI / Examples / HexEdit.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-09-23  |  2.7 KB  |  102 lines

  1. /**/
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. call Init
  7. call CreateApp
  8. call HandleApp
  9. /* never reached */
  10. /***********************************************************************/
  11. Init: procedure expose global.
  12.     l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  13.     if AddLibrary("rxmui.library")~=0 then exit
  14.     call RxMUIOpt("debugmode showerr")
  15.     return
  16. /***********************************************************************/
  17. HandleApp: procedure expose global.
  18.  
  19.     ctrl_c=2**12
  20.     do forever
  21.         call NewHandle("app","h",ctrl_c)
  22.         if and(h.signals,ctrl_c)>0 then exit
  23.         select
  24.             when h.event="QUIT" then exit
  25.             otherwise interpret h.event
  26.         end
  27.     end
  28.     /* never reached */
  29. /***********************************************************************/
  30. CreateApp: procedure expose global.
  31.  
  32.     mem=GetSpace(1024)
  33.     if mem=Null() then exit
  34.     call Export(mem,Copies("RxMUI rulezzzz!!!",50))
  35.  
  36.     app.Title="HexEditExample"
  37.     app.Version="$VER: HexEditExample 2.0 (10.9.2001)"
  38.     app.Copyright="©2000, alfie"
  39.     app.Author="alfie"
  40.     app.Description="HexEditExample"
  41.     app.Base="RXMUIEXAMPLE"
  42.     app.SubWindow="win"
  43.      win.ID="MAIN"
  44.      win.Title="HexEditExample"
  45.      win.Contents="MGROUP"
  46.      win.ID="MAIN"
  47.      win.Title="HexEdit Example"
  48.      win.UseRightBorderScroller=1
  49.      win.Contents="mgroup"
  50.  
  51.       mgroup.0="reg"
  52.        reg.Class="Register"
  53.        reg.Titles="No scroll|Scroll|Win scroll"
  54.  
  55.         reg.0="he0"
  56.          he0.Class="HexEdit"
  57.          he0.Frame="Virtual"
  58.          he0.EditMode=1
  59.          he0.LowBound=mem
  60.          he0.HighBound=d2c(c2d(mem)+1023)
  61.  
  62.         reg.1="sg1"
  63.          sg1.class="group"
  64.          sg1.horiz=1
  65.          sg1.spacing=0
  66.           sg1.0="he1"
  67.            he1.class="hexedit"
  68.            he1.Frame="Virtual"
  69.            he1.EditMode=1
  70.            he1.LowBound=mem
  71.            he1.HighBound=d2c(c2d(mem)+1023)
  72.            he1.PropObject="Scroll1"
  73.           sg1.1=XNewObj("Scrollbar","Scroll1")
  74.  
  75.         reg.2="sg2"
  76.          sg2.class="group"
  77.          sg2.horiz=1
  78.          sg2.spacing=0
  79.           sg2.0="he2"
  80.            he2.class="hexedit"
  81.            he2.Frame="Virtual"
  82.            he2.EditMode=1
  83.            he2.LowBound=mem
  84.            he2.HighBound=d2c(c2d(mem)+1023)
  85.            he2.PropObject="Scroll2"
  86.             Scroll2.UseWinBorder="right"
  87.           sg2.1=XNewObj("scrollbar","Scroll2")
  88.  
  89.     if NewObj("Application","app")>0 then exit
  90.  
  91.     call set("win","Open",1)
  92.     if ~xget("win","Open") then exit
  93.  
  94.     call Notify("win","CloseRequest",1,"app","ReturnID","quit")
  95.  
  96.     return
  97. /***********************************************************************/
  98. halt:
  99. break_c:
  100.     exit
  101. /**************************************************************************/
  102.